Monitoring the performance of a computing environment includes analyzing measurement data collected for that environment. The measurement data that is collected is used for accounting, capacity planning and/or to determine where improvements are to be made so that system performance can be enhanced.
One subsystem of a computing environment for which data is collected is the I/O subsystem. In one example, an I/O measurement facility, such as the Resource Management Facility (RMF) offered by International Business Machines Corporation, Armonk, N.Y., is used to accumulate data for the I/O subsystem. The data that is collected is associated with various components of the I/O subsystem, such as subchannels which represent I/O devices, and is stored in measurement blocks for access by programs. The measurement blocks are stored in contiguous memory and thus, a particular block is accessed by a measurement block origin and index. The data stored in the existing measurement blocks is an accumulation of data over a period of time for multiple I/O operations. In order to determine the measurement data for a particular I/O operation, the operating system needs to calculate the information for that I/O operation by subtracting the counters copied from the measurement block before the I/O operation is started from the values in the measurement blocks after the I/O operation while also dealing with cases where the counters wrap.
With the ever increasing size of the I/O subsystem, the contiguous storage of the blocks is becoming cumbersome. Further, the measurement blocks are cumbersome because the operating system cannot dynamically grow the contiguous real storage when the system is up and running and additional devices are dynamically added. Moreover, the existing blocks are inadequate for the information that is desired. Yet further, the time it takes for a program to calculate the information for a particular I/O operation is increasing and such calculations lead to inaccuracies because of the insufficient granularity.
A subchannel provides the logical appearance of a device to the program and contains the information required for sustaining a single I/O operation. The subchannel consists of internal storage that contains information in the form of a CCW address, channel-path identifier, device number, count, status indications, and I/O-interruption subclass code, as well as information on path availability and functions pending or being performed. I/O operations are initiated with a device by executing I/O instructions that designate the subchannel associated with the device.
Each device is accessible by means of one subchannel per channel subsystem to which it is assigned during installation. The device may be a physically identifiable unit or may be housed internal to a control unit. For example, in certain disk-storage devices, each actuator used in retrieving data is considered to be a device. In all cases, a device, from the point of view of the channel subsystem, is an entity that is uniquely associated with one subchannel and that responds to selection by the channel subsystem by using the communication protocols defined for the type of channel path by which it is accessible.
In some models, subchannels are provided in blocks. In these models, more subchannels may be provided than there are attached devices. Subchannels that are provided but do not have devices assigned to them are not used by the channel subsystem to perform any function and are indicated by storing the associated devicenumber-valid bit as zero in the subchannel information block of the subchannel.
The number of subchannels provided by the channel subsystem is independent of the number of channel paths to the associated devices. For example, a device accessible through alternate channel paths still is represented by a single subchannel. Each subchannel is addressed by using a 16-bit binary subchannel number.
After I/O processing at the subchannel has been requested by executing START SUBCHANNEL, the CPU is released for other work, and the channel subsystem assembles or disassembles data and synchronizes the transfer of data bytes between the I/O device and main storage. To accomplish this, the channel subsystem maintains and updates an address and a count that describe the destination or source of data in main storage. Similarly, when an I/O device provides signals that should be brought to the attention of the program, the channel subsystem transforms the signals into status information and stores the information in the subchannel, where it can be retrieved by the Program.
Resume Subchannel (RSCH):
The channel subsystem is signaled to perform the resume function at the designated subchannel.
General register 1 contains the subsystem identification word, which designates the subchannel at which the resume function is to be Performed. The subchannel is made resume-pending.
Logically prior to the setting of condition code 0 and only if the subchannel is currently in the suspended state, path-not-operational conditions at the subchannel, if any, are cleared.
The channel subsystem is signaled to asynchronously perform the resume function.
Subsequent to the execution of RESUME SUBCHANNEL, the channel subsystem asynchronously performs the resume function. Except when the subchannel is subchannel-active, if the execution of RESUME SUBCHANNEL results in the setting of condition code 0, performance of the resume function causes execution of a currently suspended channel program to be resumed with the associated device, provided that the suspend flag for the current CCW has been set to zero by the program. If the suspend flag remains set to one, execution of the channel program remains suspended. But, if the subchannel is subchannel active at the time the execution of RESUME SUBCHANNEL results in the setting of condition code 0, then it is unpredictable whether execution of the current program is resumed or whether it is found by the resume function that the subchannel has become suspended in the interim. The subchannel is found to be suspended by the resume function only if the subchannel is status-pending with intermediate status when the resume-pending condition is recognized by the channel subsystem.
Start Subchannel (SSCH):
The channel subsystem is signaled to synchronously perform the start function for the associated device, and the execution parameters that are contained in the designated ORB are placed at the designated subchannel.
General register 1 contains the subsystem identification word, which designates the subchannel that is to be started. The second-operand address is the logical address of the ORB and is designated on a word boundary.
The execution parameters contained in the ORB are placed at the subchannel.
When START SUBCHANNEL is executed and the subchannel is status-pending with only secondary status and the extended-status-word format bit (L bit) is zero, the status-pending condition is discarded at the subchannel.
The subchannel is made start-pending, and the start function is indicated at the subchannel.
Logically prior to the setting of condition code 0, path-not-operational conditions at the subchannel, if any, are cleared.
The channel subsystem is signaled to asynchronously perform the start function.
Condition code 0 is set to indicate that the actions described above have been taken.
Associated Functions
Subsequent to the execution of START SUBCHANNEL, the channel subsystem asynchronously performs the start function.
The contents of the ORB, other than the fields that must contain all zeros, are checked for validity. In some models, the fields of the ORB that must contain zeros are also checked asynchronously (rather than during the execution of the instruction). When invalid fields are detected asynchronously, the subchannel becomes status-pending with primary, secondary, and alert status and with deferred condition code 1 and program check indicated. In this situation, the I/O operation or chain of I/O operations is not initiated at the device, and the condition is indicated by the start-pending bit being stored as one when the SCSW is cleared by the execution of TEST SUBCHANNEL.
In some models, path availability is tested asynchronously (rather than as part of the execution of the instruction). When no channel path is available for selection, the subchannel becomes status-pending with primary and secondary status and with deferred condition code 3 indicated. The I/O operation or chain of I/O operations is not initiated at the device, and this condition is indicated by the start-pending bit being stored as one when the SCSW is cleared by the execution of TEST SUBCHANNEL.
If conditions allow, a channel path is chosen and execution of the channel program that is designated in the ORB is initiated.
Start Function and Resume Function
Subsequent to execution of START SUBCHANNEL and RESUME SUBCHANNEL, the channel subsystem performs the start and resume functions, respectively, to initiate an I/O operation with the associated device. Performance of a start or resume function consists of: (1) executing a path-management operation, (2) executing an I/O operation or chain of I/O operations with the associated device, and (3) causing the sub-channel to be made status-pending, indicating completion of the start function. The start function initiates the execution of a channel program that is designated in the ORB, which in turn is designated as the operand of START SUBCHANNEL, in contrast to the resume function which initiates the execution of a suspended channel program, if any, beginning at the CCW that caused suspension; otherwise, the resume function is performed as if it were a start function.
Start-Function and Resume-Function Path Management
A path-management operation is executed by the channel subsystem during the performance of either a start or resume function to choose an available channel path that can be used for device selection to initiate an I/O operation with that device. The actions taken are as follows:    1. If the subchannel is currently start-pending and device-active, the start function remains pending at the subchannel until the secondary status for the previous start function has been accepted from the associated device and the subchannel is made start-pending alone. When the status is accepted and it does not describe an alert interruption condition, the subchannel is not made status-pending, and the performance of the pending start function is subsequently initiated. If the status describes an alert interruption condition, the subchannel becomes status-pending with secondary and alert status, the pending start function is not initiated, deferred condition code 1 is set, and the start-pending bit remains one. If the subchannel is currently start-pending alone, the performance of the start function is initiated as described below.    2. If a dedicated allegiance exists at the subchannel for a channel path, the channel subsystem chooses that path for device selection. If a busy condition is encountered while attempting to select the device and a dedicated allegiance exists at the subchannel, the start function remains pending until the internal indication of busy is reset for that channel path. When the internal indication of busy is reset, the performance of the pending start function is initiated on that channel path.    3. If no channel paths are available for selection and no dedicated allegiance exists in the subchannel for a channel path, a channel path is not chosen.    4. If all channel paths that are available for selection have been tried and one or more of them are being used to actively communicate with other devices, or, alternatively, if the channel subsystem has encountered either a control-unit-busy or device-busy condition on one or more of those channel paths, or a combination of those conditions on one or more of those channel paths, the start function remains pending at the subchannel until a channel path, control unit, or device, as appropriate, becomes available.    5. If (1) the start function is to be initiated on a channel path with a device attached to a type-i control unit and (2) no other device is attached to the same control unit whose subchannel has either a dedicated allegiance to the same channel path or a working allegiance to the same channel path where primary status has not been received for that subchannel, then that channel path is chosen if it is available for selection; otherwise, that channel path is not chosen. If, however, another channel path to the device is available for selection and if no allegiances exist as described above, that channel path is chosen. If no other channel paths are available for selection, the start or resume function, as appropriate, remains pending until a channel path becomes available.    6. If the device is attached to a type-3 control unit and if at least one other device is attached to the same control unit whose subchannel has a dedicated allegiance to the same channel path, another channel path that is available for selection may be chosen, or the start function remains pending until the dedicated allegiance for the other device is cleared.    7. If a channel path has been chosen and a busy indication is received during device selection to initiate execution of the first command of a pending channel program, the channel path over which the busy indication is received is not used again for that device or control unit (depending on the device-busy or control-unit-busy indication received) until the internal indication of busy is reset.    8. If, during an attempt to select the device in order to initiate execution of the first command specified for the start or implied for the resume function, the channel subsystem receives a busy indication, it performs one of the following actions:    a. If the device is specified to be operating in multipath mode and the busy indication received is device busy, then the start or resume function remains pending until the internal indication of busy is reset.    b. If the device is specified to be operating in multipath mode and the busy indication received is control unit busy, or if the device is specified to be operating in single-path mode, the channel subsystem attempts selection of the device by choosing an alternate channel path that is available for selection and continues the path-management operation until either the start or resume function is initiated or selection of the device has been attempted on all channel paths that are available for selection. If the start or resume function has not been initiated by the channel subsystem after all channel paths available for selection have been chosen, the start or resume function remains pending until the internal indication of busy is reset.    c. If the subchannel has a dedicated allegiance, then action 2 applies.    9. When, during the selection attempt to transfer the first command, the device appears not operational and the corresponding channel path is operational for the subchannel, a path-not-operational condition is recognized, and the state of the channel path changes at the subchannel from operational for the subchannel to not operational for the subchannel. The path-not-operational conditions at the subchannel, if any, are preserved until the subchannel next becomes clearpending, start-pending, or resume-pending (if the subchannel was suspended), at which time the path-not-operational conditions are cleared. If, however, the corresponding channel path is not operational for the subchannel, a path-not-operational condition is not recognized. When the device appears not operational during the selection attempt to transfer the first command on a channel path that is available for selection, one of the following actions occurs:    a. If a dedicated allegiance exists for that channel path, then it is the only channel path that is available for selection; therefore, further attempts to initiate the start or resume function are abandoned, and an interruption condition is recognized.    b. If no dedicated allegiance exists and there are alternate channel paths available for selection which have not been tried, one of those channel paths is chosen to attempt device selection and transfer the first command.    c. If no dedicated allegiance exists, no alternate channel paths are available for selection which have not been tried, and the device has appeared operational on at least one of the channel paths that were tried, the start or resume function remains pending at the subchannel until either a channel path, a control unit, or the device, as appropriate, becomes available.    d. If no dedicated allegiance exists, no alternate channel paths are available for 1selection which have not been tried, and the device has appeared not operational on all channel paths that were tried, further attempts to initiate the start or resume function are abandoned, and an interruption condition is recognized.    10. When the subchannel is active and an I/O operation is to be initiated with a device, all device selections occur according to the LPUM indication if the multipath mode is not specified at the subchannel. For example, if command chaining is specified, the channel subsystem transfers the first and all subsequent commands describing a chain of I/O operations over the same channel path.Measurement-Block Update
The measurement-block-update facility provides the program with the capability of accumulating performance information for subchannels that are enabled for the measurement-block-update mode when the measurement-block-update mode is active. A subchannel is enabled for measurement-block-update mode by setting bit 11 of word 1 of the SCHIB operand to one and then executing MODIFY SUBCHANNEL. The measurement-block-update mode is made active by executing SET CHANNEL MONITOR when bit 62 of general register 1 is one.
When the measurement-block-update mode is active and the subchannel is enabled for the measurement-block-update mode, information is accumulated in a measurement block associated with the subchannel. A measurement block is a 32-byte area in main storage that is associated with a subchannel for the purpose of accumulating measurement data. The program specifies a contiguous area of absolute storage, referred to as the measurement-block area, and subdivides this area into 32-byte blocks, one block for each subchannel for which measurement data is to be Accumulated. The measurement-block-update facility uses the measurement-block index contained at the subchannel in conjunction with the measurement-block origin established by the execution of SET CHANNEL MONITOR to compute the absolute address of the measurement block associated with a subchannel.
Measurement data is stored in the measurement block associated with the subchannel each time an I/O operation or chain of I/O operations initiated by START SUBCHANNEL is suspended or completed. The completion of an I/O operation or chain of I/O operations is normally signaled by the primary interruption condition. Seven fields are defined in the measurement block in which measurement data is accumulated by the measurement-block-update facility: SSCH+RSCH count, sample count, device-connect time, function-pending time, device-disconnect time, control-unit-queuing, and device-active-only time.
Measurement Block The measurement block is a 32-byte area at the location designated by the program, using the measurement-block origin in conjunction with the measurement-block index. 1The measurement block contains the accumulated values of the measurement data described below. When the measurement-block-update mode is active and the subchannel is enabled for measurement-block update, the measurement-block-update facility accumulates the values for the measurement data that accrue during the execution of an I/O operation or chain of I/O operations initiated by START SUBCHANNEL.
When the I/O operation or chain of I/O operations is suspended or completed and no error condition is encountered, the accrued values are added to the accumulated values in the measurement block for that subchannel. If an error condition is detected and subchannel-logout information is stored in the extended-status word (ESW), the accrued values are not added to the accumulated values in the measurement block for the subchannel, and the two count fields are not incremented.
If any of the accrued time values is detected to exceed the internal storage provided for accruing these values, or the control unit cannot provide an accurate queuing time or defer time for the current operation, or the channel subsystem successfully recovers from certain error conditions, none of the accrued values are added to the measurement block for the subchannel, the sample count is not incremented, but the SSCH+RSCH count is incremented.
Accesses to the measurement block by the measurement-block-update facility, in order to accumulate measurement data at the suspension 1or completion of an I/O function, appear blockconcurrent to CPUs. CPU accesses to the block, either fetches or stores, are inhibited during the time the measurement-block update is being performed by the measurement-block-update facility.
SSCH+RSCH Count: Bits 0-15 of word 0 are used as a binary counter. During the performance of a start function for which measurement-block update is active, when (1) the primary or secondary interruption condition, as appropriate, is recognized or (2) the suspend function is performed, the counter is incremented by adding one in bit position 15, and the measurement data is stored. The counter wraps around from the maximum value of 65,535 to 0. The program is not alerted when counter overflow occurs.
If the measurement-block-update mode is active and the subchannel is enabled for measuring, the SSCH+RSCH count is incremented even when the lack of measured values for an individual start function precludes the updating of the remaining fields of the measurement block or when the timing-facility bit for the subchannel is zero. The SSCH+RSCH count is not incremented if the measurement-block-update mode is inactive, if the subchannel is not enabled for the measurement block update, or if subchannel-logout information has been generated for the start function.
Sample Count: Bits 16-31 of word 0 are used as a binary counter. When the time-accumulation fields following word 0 of the measurement block are updated, the counter is incremented by adding one in bit position 31. On some models, certain conditions may preclude the measurement-block-update facility obtaining the accrued values of the measurement data for an individual start function, even when the measurement-block-update mode is active and the subchannel is enabled for that mode. The control unit may also signal that it was not able to accumulate an accurate queuing time. In these situations, the sample-count field is not incremented.
The counter wraps around from the maximum value of 65,535 to 0. The program is not alerted when counter overflow occurs. This field is not updated if the channel-subsystem-timing facility is not provided for the subchannel.
The System Library publication for the system model specifies the conditions, if any, that preclude the updating of the sample count and time accumulation fields of the measurement block.
Device-Connect Time: Bits 0-31 of word 1 contain the accumulation of measured deviceconnect-time intervals. The device-connect-time interval (DCTI) is the sum of the time intervals measured whenever the device is logically connected to a channel path while the subchannel is subchannel active and the device is actively communicating with the channel path. The deviceconnect time does not include the intervals when a device is logically connected to a channel path but is not actively communicating with the channel. The device reports the accumulation of time intervals when the device is logically connected but not actively communicating with the channel path as control-unit-defer time. The control-unit-defer time is not included in the device-connect-time measurement but, rather, is added to the accrued device-disconnect-time measurement for the operation.
The time intervals are measured using a resolution of 128 microseconds. The accumulated value is modulo approximately 152.71 hours, and the program is not alerted when an overflow occurs. This field is not updated if (1) the channel-subsystem-timing facility is not provided for the subchannel, (2) the measurement-block-update mode is inactive, or (3) any of the time values accrued for the current start function has been detected to exceed the internal storage in which it was accrued.
Accumulation of device-connect-time intervals for a subchannel and storing this data in the ESW are not affected by whether the measurement-block-update mode is active.
Function-Pending Time: Bits 0-31 of word 2 contain the accumulated SSCH- and RSCH-function-pending time. Function-pending time is the time interval between acceptance of the start function (or resume function if the subchannel is in the suspended state) at the subchannel and acceptance of the first command associated with the initiation or resumption of channel-program execution at the device.
When channel-program execution is suspended because of a suspend flag in the first CCW of a channel program, the suspension occurs prior to transferring the first command to the device. In this case, the function-pending time accumulated up to that point is added to the value in the function-pending-time field of the measurement block. Function-pending time is not accrued while the subchannel is suspended. Function-pending time begins-to be accrued again, in this case, when RESUME SUBCHANNEL is subsequently executed while the designated subchannel is in the suspended state.
The function-pending-time interval is measured using a resolution of 128 microseconds. The accumulated value is modulo approximately 152.71 hours, and the program is not alerted when an overflow occurs. This field is not updated if the channel-subsystem-timing facility is not provided for the subchannel.
Device-Disconnect Time: Bits 0-31 of word 3 contain the accumulated device-disconnect time. Device-disconnect time is the sum of the time intervals measured whenever the device is logically disconnected from the channel subsystem while the subchannel is subchannel-active. The device-disconnect time also includes the sum of control-unit-defer-time intervals reported by the device during the I/O operation.
Device-disconnect time is not accrued while the subchannel is in the suspended state. Device-disconnect time begins to be accrued again, in this case, on the first device disconnection after channel-program execution has been resumed at the device (the subchannel is again subchannelactive).
The device-disconnect-time interval is measured by using a resolution of 128 microseconds. The accumulated value is modulo approximately 152.71 hours; the program is not alerted when an overflow occurs. This field is not updated if the channel-subsystem-timing facility is not provided for the subchannel.
The device-disconnect time does not include the interval between the primary status condition and the secondary status condition at the end of an I/O operation when the subchannel is no longer subchannel-active, but the I/O device is active. If the channel subsystem provides the device-activeonly measurement facility, this time is accumulated into the device-active-only time field of the measurement block.
Control-Unit-Queuing Time: Bits 0-31 of word 4 contain the accumulated control-unit-queuing time. Control-unit-queuing time is the sum of the time intervals measured by the control unit whenever the device is logically disconnected from the channel subsystem during an I/O operation while the device is busy with an operation initiated from a different system.
Control-unit-queuing time is not accrued while the subchannel is in the suspended state. Control-unit-queuing time may be accrued for the channel program after the subchannel becomes subchannel-active following a successful Resumption.
The control-unit-queuing-time field is updated such that bit 31 represents 128 microseconds. The accumulated value is modulo approximately 152.71 hours; the program is not alerted when an overflow occurs. This field is not updated if the channel-subsystem-timing facility is not provided for the subchannel, or if the control unit does not provide a queuing time.
Device-active-only time: Bits 0-31 of word 5 contain the accumulated device-active-only time. Device-active-only time is the sum of the time intervals when the subchannel is device-active but not subchannel-active at the end of an I/O operation or chain of I/O operations initiated by a start function or resume function.
Device-active-only time is not accumulated when the subchannel is device-active during periods that the subchannel is active; such time is accumulated as device-connect time or device-disconnect time as appropriate.
The device-active-only-time field is updated such that bit 31 represents 128 microseconds. The accumulated value is modulo approximately 152.71 hours; the program is not alerted when an overflow occurs. This field is not updated if the channel-subsystem-timing facility is not provided for the subchannel.
Control-Unit-Defer Time: Control-unit-defer time is the sum of the time intervals measured by the control unit whenever the device is logically connected to the channel subsystem during an I/O operation but is not actively communicating with the channel because of device-dependent delays in channel program execution. The control-unit-defer-time is not stored in the measurement block as a separate measurement field but is used in the calculation of device-connect-time measurement and device-disconnect-time measurement for an operation.
Control-unit-defer time, if supported by a control unit, is accrued while the device is logically connected to the channel. The time is reported to the channel when channel-end status is presented that causes a device disconnection or terminates the I/O operation. Control-unit-defer time is subtracted from the device-connect-time measurement and is added to the device-disconnect-time measurement reported for the operation.
Reserved: The remaining words of the measurement block, along with any words associated with facilities that are not provided by the channel subsystem or the subchannel, are reserved for future use. They are not updated by the measurement-block-update facility.
Measurement-Block Origin: The measurement-block origin specifies the absolute address of the beginning of the measurement-block area on a 32-byte boundary in main storage. The measurement-block origin is passed from general register 2 to the measurement-block-update facility when SET CHANNEL MONITOR is executed with bit 62 of general register 1 set to One.
Measurement-Block Key Bits 32-35 of general register 1 form the four-bit access key to be used for subsequent measurement-block updates when SET CHANNEL MONITOR causes the measurement-block-update mode to be made active. The measurement-block key is passed to the measurement-block-update facility whenever the measurement-block origin is passed.
Measurement-Block Index The measurement-block index is set in the subchannel through the execution of MODIFY SUBCHANNEL. The measurement-block index specifies which 32-byte measurement block, relative to the measurement-block origin, is to be used for accumulating the measurement-block parameters for that subchannel. The location of the measurement block of a subchannel is computed by the measurement-block-update facility by appending five rightmost zeros to the measurement-block index of the subchannel and adding the result to the measurement-block origin. The result is the absolute address of the 32-byte measurement block for that subchannel. When the computed measurement-block address exceeds 231-1, a measurement-block program-check condition is recognized, and measurement-block updating does not occur for the preceding subchannel-active Period.
Programming Note: The initial value of the measurement-block index is zero. The program is responsible for setting the measurement-block index to the proper value prior to enabling the subchannel for the measurement-block-update mode and making the mode active. To preclude the possibility of unpredictable results for the measured parameters in the measurement block, each subchannel for which measured parameters are to be accumulated must have a different value for its measurement-block index.
Measurement-Block-Update Mode: The measurement-block-update mode is made active by executing SET CHANNEL MONITOR with bit 62 of general register 1 set to one. If bit 62 of general register 1 is zero when SET CHANNEL MONITOR is executed, the mode is made inactive. When the measurement-block-update mode is inactive, no measurement values are accumulated in main storage. When the measurementblock-update mode is made active, the contents of general register 2 are passed to the measurement-block-update facility as the absolute address of the measurement-block origin. The MBK is also passed to the measurement-blockupdate facility as the access key to be used when updating the measurement block for each subchannel. When the measurement-block-update mode is active, the measurement-block-update facility accumulates measurements in individual measurement blocks within the measurement-block area for subchannels whose measurementblock-update-enable bit is one.
If the measurement-block-update mode is already active when SET CHANNEL MONITOR is executed, the values for the measurement-block origin and measurement-block key that are used for a subchannel enabled for measuring by the
measurement-block-update facility are dependent upon whether SET CHANNEL MONITOR is executed prior to, during, or subsequent to execution of START SUBCHANNEL for that subchannel. If SET CHANNEL MONITOR is executed prior to START SUBCHANNEL, the current measurementblock origin and measurement-block key are in control. If SET CHANNEL MONITOR is executed during or subsequent to execution of START SUBCHANNEL, it is unpredictable whether the measurement-block origin and measurement-block key that are in control are old or current.
Measurement-Block-Update Enable Bit 11, word 1, of the SCHIB is the measurementblock-update-enable bit. This bit provides the capability of controlling the accumulation of measurement-block parameters on a subchannel basis. The initial value of the enable bit is zero.
When MODIFY SUBCHANNEL is executed with the enable bit set to one in the SCHIB, the subchannel is enabled for the measurement-block-update mode. If the measurement-block-update mode is active, the measurement-block-update facility accumulates measurement-block parameters for the subchannel, starting with the next START SUBCHANNEL issued to that subchannel. Similarly, if MODIFY SUBCHANNEL is executed with bit 11 of word 1 of the SCHIB operand set to zero by the program, the subchannel is disabled for the measurement-block-update mode, and no additional measurement-block parameters are accumulated for that subchannel.
Control-Unit-Queuing Measurement: The control-unit-queuing-measurement facility allows the channel subsystem to accept queuing times from control units and, in conjunction with the measurement-block-update facility, to accumulate those times in the measurement block.
The System Library publication for the control-unit model specifies its ability to supply queuing time. If a control-unit model is capable of supplying queuing time, the publication specifies the conditions that prevent the control unit from accumulating an accurate control-unit-queuing time.
Control-Unit-Defer Time: The control-unitdefer-time facility allows the channel subsystem to accept defer times from control units and, in conjunction with the measurement-block-update facility, to modify the device-connect and devicedisconnect times reported in the measurement block to reflect the defer time. The control-unitdefer time is subtracted from the device-connect-time measurement and is added to the device-disconnect-time measurement reported for an I/O operation.
The System Library publication for the control-unit model specifies its ability to supply defer time. If a control-unit model is capable of supplying defer time, the publication specifies the conditions that prevent the control unit from accumulating an accurate control-unit-defer time.
Device-Active-Only Measurement The device-active-only-measurement facility permits the channel subsystem to report the times that the device is disconnected between primary status and secondary status at the end of an I/O operation or chain of I/O operations. The deviceactively-only time is accumulated into word 5 of the 32-byte measurement block. This time is not otherwise represented by the measurement data.: When the device-active-only-measurement facility is not installed, measurement block updates are performed when the subchannel becomes status pending for primary status. When the device-active-only-measurement facility is installed, the measurement block updates are performed at the time that secondary status is accepted from the I/O device, in order that the device-active time between primary status and secondary status can be reported.
If the subchannel is start pending when secondary status is accepted from the I/O device and the measurement block update is to be performed, the measurement block update is performed prior to performing the start function. If measurement-block errors occur, they are reported to the program along with the secondary status instead of performing the start function.
Time-Interval-Measurement Accuracy On some models, when time intervals are to be measured and condition code 0 is set for START SUBCHANNEL (or RESUME SUBCHANNEL in the case of a suspended subchannel), a period of latency may occur prior to the initiation of the function-pending time measurement. The System Library publication for the system model specifies the mean latency value and variance for each of the measured time intervals.
Programming Notes:
1. Excessive delays may be encountered by the channel subsystem when attempting to update measurement data if the program is concurrently accessing the same measurement-block area. A programming convention should ensure that the storage block designated by SET CHANNEL MONITOR is made read-only while the measurement-block-update mode is Active.
2. To ensure that programs written to support measurement functions are executed properly, the program should initialize all the measurement blocks to zeros prior to making the measurement-block-update mode active. Only zeros should appear in the reserved and unused words of the measurement blocks.
3. When the incrementing of an accumulate value causes a carry to be propagated out of bit position 0, the carry is ignored, and accumulating continues from zero on.
Device-Connect-Time Measurement
The device-connect-time-measurement facility provides the program with the capability of retrieving the length of time that a device is actively communicating with the channel subsystem while executing a channel program. The measured length of time that the device spends actively communicating on a channel path during the execution of a channel program is called the device-connect-time interval (DCTI). Control-unit-defer time is not included in the DCTI.
If timing facilities are provided for the subchannel, the DCTI value is passed to the program in the extended-status word (ESW) at the completion of the operation when the primary-status condition is cleared by TEST SUBCHANNEL and when TEST SUBCHANNEL clears an intermediate-status condition alone while the subchannel is suspended. The DCTI value passed in the ESW pertains to the previous subchannel-active period. The passing of the DCTI in the ESW is under program control by the SET CHANNEL MONITOR deviceconnect-time-measurement mode-control bit and the corresponding enable bit in the subchannel. However, the DCTI value is not stored in the ESW if the I/O function initiated by START SUBCHANNEL is terminated because of an error condition that is described by subchannel logout (see
the section. In this case, the extended-status bit (L) of the SCSW is stored as one, indicating that the ESW contains logout information describing the error condition. If the accrued DCTI value exceeded 8.388608 seconds during the previous subchannel-active period, then the maximum value (FFFF hex) is passed in the ESW.
Device-Connect-Time-Measurement Mode The device-connect-time-measurement mode is made active by executing SET CHANNEL MONITOR when bit 63 of general register 1 is one. If bit 63 of general register 1 is zero when SET CHANNEL MONITOR is executed, the mode is made inactive, and DCTIs are not passed to the program. When timing facilities are provided for the subchannel, the device-connect-time-measurement mode is active, and the subchannel is enabled for the mode, the DCTI value is passed to the program in the ESW stored when TEST SUBCHANNEL (1) clears the primary-interruption condition with no logout information indicated in the SCSW (extended-status-word-format bit is zero) or (2) clears the intermediate-status condition alone while the subchannel is suspended.
If a start function is currently being executed with a subchannel enabled for the device-connect-time-measurement mode when SET CHANNEL MONITOR makes this mode active for the channel subsystem, the value of the DCTI stored under the appropriate conditions may be zero, a partial result, or the full and correct value, depending on the model and the progress of the start function at the time the mode was activated. Provision of the DCTI value in the easurementblock area is not affected by whether the deviceconnect-time-measurement mode is active.
Device-Connect-Time-Measurement Enable Bit 12, word 1, of the SCHIB is the device-connect-time measurement-mode enable bit. This bit provides the program with the capability of selectively controlling the storing of DCTI values for a subchannel when the device-connect-time-measurement mode is active. The initial value of the enable bit is zero. When this enable bit is one in the SCHIB and MODIFY SUBCHANNEL is executed, the subchannel is enabled for the device-connect-time-measurement mode. If the device-connect-time-measurement mode is active, the device-connect-time-measurement facility begins providing DCTI values for the subchannel, starting with the next START SUBCHANNEL issued to the subchannel. In this situation, the DCTI values are provided in the ESW. Similarly, if MODIFY SUBCHANNEL is executed with bit 12, word 1, of the SCHIB operand set to zero by the program, the subchannel is disabled for the device-connect-time-measurement mode, and no further DCTI values are passed to the program for that subchannel.
Signals and Resets
During system operation, it may become necessary to terminate an I/O operation or to reset either the I/O system or a portion of the I/O system. (The I/O system consists of the channel subsystem plus all of the attached control units and devices.) Various signals and resets are provided for this purpose. Three signals are provided for the channel subsystem to notify an I/O device to terminate an operation or perform a reset function or both. Two resets are provided to cause the channel subsystem to reinitialize certain information contained either at the I/O device or at the channel subsystem.
Based on the foregoing, enhancements are needed in obtaining measurement data. For example, a need exists for a capability that enhances the measurement blocks and the storage thereof. Further, a need exists for an improved capability for obtaining measurement data for a single operation.